home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
tpdb314.arc
/
PACK.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-01-30
|
1KB
|
45 lines
{$A+,B-,D+,E-,F-,I-,L-,N-,O-,R-,S-,V-}
{$M 16384,0,655360}
Program PackFile;
Uses Crt,TPDB,TPDBScrn,TPDBStr;
Var
Message : String[80];
RecCount : string;
Packer : DataObject;
begin
CursorOff;
If ParamCount = 0 then
begin
Beep;
ClrScr;
Flash(1,1,LightGreen+BlackBG,'PACK filename.dbf');
CursorOn;
Halt(1);
end;
NEW(Packer,Init(ParamStr(1)));
If Packer^.TotalRecs = 0 then
begin
ClrScr;
Beep;
Message := 'Record count in file '+Upper(ParamStr(1))+' is ZERO.';
Flash(1,1,LightGreen+BlackBG,Message);
CursorOn;
Halt(1);
end;
ClrScr;
Message := 'PACKing file '+Upper(ParamStr(1));
FlashC(11,Yellow+BlackBG,Message);
Packer^.Pack;
Str(Packer^.TotalRecs:10,RecCount);
FlashC(12,LightGreen+BlackBG,'File has been packed.');
Message := 'Current record count in file '+Upper(ParamStr(1))+' is '+LTrim(RecCount);
FlashC(13,LightCyan+BlackBG,Message);
FlashC(14,White+BlackBG,'Copyright 1991 Brian Corll');
DISPOSE(Packer,Done);
CursorOn;
end.